package dynamic

import (
	"github.com/gin-gonic/gin"
	apis "vrcm/src/vrcm/app/admin/apis/dynamic"
	"vrcm/src/vrcm/app/admin/router"
)

func init() {
	router.NoCheckRole = append(router.NoCheckRole, registerDynamicRouter)
}

func registerDynamicRouter(v1 *gin.RouterGroup) {
	api := apis.Dynamic{}
	base := v1.Group("/dynamic")
	{
		base.POST("/getPort", api.DynamicGetPort)
		base.POST("/checkPort", api.DynamicCheckPort)
		base.POST("/create", api.DynamicCreate)
		base.POST("/update", api.DynamicUpdate)
		base.POST("/update/notReqNgvsa", api.DynamicUpdateNotReqNgvsa)
		base.POST("/delete", api.DynamicDelete)
		base.POST("/stopOrRecover", api.DynamicStopOrRecover)
		base.POST("/list", api.DynamicList)
		base.POST("/info", api.DynamicInfo)
		base.POST("/updateInstanceName", api.DynamicUInstName)
		base.POST("/packageList", api.DynamicPackageList)
		base.POST("/packageInfo", api.DynamicPackageInfo)
		base.POST("/domainList", api.DynamicDomainList)
		base.POST("/dealRecord", api.DynamicDealRecord)
		base.GET("/area/list", api.AreaList)
		base.GET("/area/topoArea/topo", api.TopoArea)
		base.POST("/specialTenantList", api.SpecialTenantList)
		base.GET("/vcfn/cnameList", api.VcfnCnameList)
	}
}
